#ifndef __MOBJITEM_H
#define __MOBJITEM_H

#include "TModelArray.h"
#include "db_rec.h"

//-------------------------------------------------------------------------
namespace wh{
//-------------------------------------------------------------------------
namespace object_catalog {
//-------------------------------------------------------------------------
class MObjItem
	: public TModelData<rec::Obj>
{
public:
	MObjItem(const char option
		= ModelOption::EnableParentNotify
		| ModelOption::EnableNotifyFromChild);

	virtual bool LoadThisDataFromDb(std::shared_ptr<whTable>&, const size_t)override;
protected:


};
//-------------------------------------------------------------------------	

class MObjArray
	: public TModelArray<MObjItem>
{
public:
	MObjArray(const char option
		= ModelOption::EnableParentNotify
		| ModelOption::EnableNotifyFromChild)
	: TModelArray<MObjItem>(option)
	{}

protected:
	virtual bool GetSelectChildsQuery(wxString& query)const override;

};
//-------------------------------------------------------------------------
}//object_catalog {
//-------------------------------------------------------------------------
}//namespace wh{
//-------------------------------------------------------------------------
#endif // __****_H
